import axios from "axios";
import {
  Host_Ip2
} from "../config.js"

//所属楼宇列表
function GetBuilding() {
  return axios({
      url: Host_Ip2 + '/admin/building/allList',
      method: "GET",
  })
}
//所属楼层列表
function GetBuildingDetail(params) {
  return axios({
      url: Host_Ip2 + '/admin/buildingDetail/allList?buildingId=' + params,
      method: "GET",
  })
}
//所属房间列表
function GetRoom(params) {
  return axios({
      url: Host_Ip2 + '/admin/room/allList?buildingId=' + params.buildingId + '&buildingDetailId=' + params.buildingDetailId,
      method: "GET",
  })
}
//所有
function GetAllItem(params) {
  return axios({
      url: Host_Ip2 + '/admin/room/mapList?buildingId=' + params.buildingId + '&buildingDetailId=' + params.buildingDetailId + '&roomId=' + params.roomId + '&status=' + params.status,
      method: "GET",
  })
}

//首页申报列表
function GetPolicyList(params) {
  return axios({
      url: Host_Ip2 + '/admin/policy/list',
      method: "GET",
      params: params
  })
}
//首页活动列表
function GetactivityList(params) {
  return axios({
      url: Host_Ip2 + '/admin/activity/list',
      method: "GET",
      params: params,
  })
}

export {
  GetBuilding,
  GetBuildingDetail,
  GetRoom,
  GetAllItem,
  GetPolicyList,
  GetactivityList
}